﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ShopOnline_TabsMenu : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //首页 婚纱展示 礼服展示 配饰展示 论坛 联系我们  
            TabsMenuItem[] listItem = new TabsMenuItem[8];
            listItem[0] = new TabsMenuItem();
            listItem[0].Text = "婚纱展示";
            listItem[0].NavigateUrl = "ProductList.aspx?Category=hunsha";
            listItem[1] = new TabsMenuItem();
            listItem[1].Text = "礼服展示";
            listItem[1].NavigateUrl = "ProductList.aspx?Category=lifu";
            listItem[2] = new TabsMenuItem();
            listItem[2].Text = "配饰展示";
            listItem[2].NavigateUrl = "ProductList.aspx?Category=peishi";
            listItem[3] = new TabsMenuItem();
            listItem[3].Text = "Q&A";
            listItem[3].NavigateUrl = "QaList.aspx";

            if (Request.Url.ToString().IndexOf("Category=hunsha") > 0)
            {
                tabsMenu.SelectedIndex = 0;
            }
            if (Request.Url.ToString().IndexOf("Category=lifu") > 0)
            {
                tabsMenu.SelectedIndex = 1;
            }
            if (Request.Url.ToString().IndexOf("Category=peishi") > 0)
            {
                tabsMenu.SelectedIndex = 2;
            }
            if (Request.Url.ToString().IndexOf("QaList.aspx") > 0)
            {
                tabsMenu.SelectedIndex = 3;
            }
            tabsMenu.TabsMenuItemArray = listItem;
            tabsMenu.CssClass = "shopOnlineMenu";
        }
    }
}
